﻿Partial Public Class Contact
    Inherits Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
        Page.Title = "Liên hệ - " & ConfigurationManager.AppSettings("WebTitle")
        Dim metaTag As New HtmlMeta()
        metaTag.Name = "description"
        metaTag.Content = "Liên hệ - " & ConfigurationManager.AppSettings("WebTitle").ToString()
        Dim metaTag2 As New HtmlMeta()
        metaTag2.Name = "keywords"
        metaTag2.Content = "lien he," & ConfigurationManager.AppSettings("WebTitle").ToString().Replace("-", ",")
        Header.Controls.Add(metaTag)
        Header.Controls.Add(metaTag2)
    End Sub

    Protected Sub btnContact_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnContact.Click
        Try
            btnContact.Enabled = True
            'ct.Body = txtBody.Text
            'ct.Email = txtEmail.Text
            'ct.IP = Request.UserHostAddress.ToString
            'ct.Name = txtFullNaText
            'ct.Title = txtTitle.Text
            'ct.Create()
            ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "alertmsg", "alert('Cảm ơn bạn đã gửi liên hệ.');", True)
            ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), "redirectlogin", "location.href='" & ConfigurationManager.AppSettings("HomeUrl").ToString & "'", True)
        Catch ex As Exception
            'lg.WriteLog(ex.Message, "Contact Create Error")
        End Try
    End Sub
End Class